package com.cloud.test.cloudribbon.biz;

import java.util.Observable;

/**
 * Subeject class
 *
 * @author xule
 * @date 2018/06/28
 */
public class Subject extends Observable{

    public static void main(String[] args) {
        Subject subject = new Subject();
        subject.addObserver(new Server("service1"));
        subject.addObserver(new Server("service2"));
        subject.addObserver(new Server("service3"));

        subject.setChanged();
        subject.notifyObservers("{\"args\":\"this is params\"}");
    }
}
